table.UNDELETE Function
Syntax
Arguments
- Records_Undeleted
The number of records that were undeleted.
- start_rec
Optional. Default = first deleted record of table. The number of the first deleted record to be undeleted.
- end_rec
Optional. Default = last deleted record of table. The number of the last deleted record to be undeleted.
- mark_rec
Optional. Default = .F. (FALSE). Specifies whether to mark undeleted records.
- .T. = mark undeleted records
- .F. = do not mark undeleted records
Description
Un-delete records in a table
Discussion
The <TBL>.UNDELETE() method undeletes a range of records in a table. The operation is performed on the records in the table pointed to by the object pointer, <TBL>. If Starting_Record and Ending_Record are not supplied, then Alpha Anywhere undeletes all of the records in the table. Note : Records can only be undeleted before the table has been packed.
Example
Type the following in the Interactive window.
t = table.open("Customer") t.records_get()-> 60 'delete all records t.delete_range(".T.") t.records_get()-> 0 'Undelete records 10 through 20 t.undelete(10,20) t.records_get()-> 11 'Undelete all records t.undelete() t.records_get()-> 60 'undelete all records, and mark those that are undeleted '(assume that 99999999 will be more that total records in table) t.undelete(1,99999999,.T.)
See Also